<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script language="javascript" type="text/javascript" src="http://www.ucmaim.com/Public/Ucmaim/Admin/js/jquery.js"></script>
<script src="http://www.ucmaim.com/Public/Ucmaim/Admin/js/frame.js" language="javascript" type="text/javascript"></script>
<link href="http://www.ucmaim.com/Public/Ucmaim/Admin/css/style.css" rel="stylesheet" type="text/css" />

<!--[if IE 6]>
<script src="http://www.ucmaim.com/Public/Ucmaim/Admin/js/DD_belatedPNG.js" language="javascript" type="text/javascript"></script>
<script>
  DD_belatedPNG.fix('.nav ul li a,.top_link ul li,background');   /* string argument can be any CSS selector */
</script>
<![endif]-->
</head>
<body class="showmenu">
<style type="text/css">
    .layui-layer-tips{width:auto !important;}
</style>
<script src="http://www.ucmaim.com/Public/Ucmaim/Home/Js/common.js" type="text/javascript"></script>
<script src="/Public/Layer/layer.js" type="text/javascript"></script>
<script src="/Public/DatePicker/DatePicker.js" type="text/javascript"></script>
<link href="/Public/DatePicker/Css/DatePicker.css" type="text/css" rel="stylesheet" />
<table width="100%" height="31px" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
    <tr>
        <td height="31"><div class="titlebt">订单查询</div></td>
    </tr>
</table>

<div class="main">
    <div class="operate">
        <div class="left_pad">
            <form id="search" method="post" action="/admin/order/Index/">
                <!-- 筛选 -->
                <table>
                    <tr>
                        <td>
                            <label>订单号：<input type="text" name="sn" class="inp_default" value="<?php echo ($search["sn"]); ?>" placeholder="请输入订单号"></label>
                            <label>买家：<input type="text" name="buyer" class="inp_default" value="<?php echo ($search["buyer"]); ?>" placeholder="请输入买家用户名/手机号码"></label>
                            <label>卖家：<input type="text" name="seller" class="inp_default" value="<?php echo ($search["seller"]); ?>" placeholder="请输入卖家用户名/手机号码"></label>
                            <label>订单时间：<input type="text" class="inp_default" style="width:180px; text-align: center;" name="date" id="datePicker" readonly /></label>
                        </td>
                    </tr>
                    <tr>
                        <td>
                        状态筛选：
                        <?php if(is_array($status)): foreach($status as $key=>$vo): ?><label>
                                <input type="checkbox" class="status" name="status[]" value="<?php echo ($key); ?>" <?php echo ($vo["checked"]); ?> /> <?php echo ($vo["text"]); ?>
                            </label>
                            &nbsp;&nbsp;<?php endforeach; endif; ?>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <input type="hidden" name="search" value="0" />
                            <input type="submit" class="btn_blue" value="查  询">
                            <?php if($ShowClearStorageBtn === true): ?><input type="button" class="btn_blue" onclick="location.href='<?php echo U('Admin/Order/ClearStorageBtn');?>'" value="批量取消支付超时订单"><?php endif; ?>
                        </td>
                    </tr>
                </table>
                <script type="text/javascript">
                    var dateRange1 = new pickerDateRange('datePicker', {
                                isTodayValid: true,
                                aToday: 'aTodayDemo1', //今天
                                aRecent30Days: 'aRecent30DaysDemo1', //最近30天
                                aRecent90Days: 'aRecent90DaysDemo1', //最近90天
                                aRecent1Year: 'aRecent1YearDemo1',//最近1年
                            <?php if(empty($start)): ?>startDate: '<?php echo date('Y-m-d', time()-2592000);?>',
                            endDate: '<?php echo date('Y-m-d', time());?>',
                    <?php else: ?>
                    startDate: '<?php echo ($start); ?>',
                            endDate:   '<?php echo ($end); ?>',<?php endif; ?>
                    needCompare: false,
                            target: 'searchForm',
                            defaultText: ' ~ ',
                            autoSubmit: true,
                            inputTrigger: 'datePicker',
                            theme: 'ta',
                            magicSelect: false,
                    });

                    $('#search').change(function(){
                        $('input[name="search"]').val(1);
                    });
                </script>
            </form>
        </div>
    </div>
    <div class="list">
            <table width="100%">
                <tr>
                    <th>订单号</th>
                    <th>买家</th>
                    <th>卖家</th>
                    <th>商品名称</th>
                    <th>订单金额</th>
                    <th>订单时间</th>
                    <th>买家支付宝账号</th>
                    <th>状态</th>
                    <th>操作</th>
                </tr>

                <?php if(empty($list)): ?><tr>
                        <td colspan="9">本区域暂无数据显示...</td>
                    </tr>
                    <?php else: ?>
                    <?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><tr>
                            <td><?php echo ($v["order_sn"]); ?></td>
                            <td><?php echo ($v["buyer_name"]); ?></td>
                            <td><?php echo ($v["seller_name"]); ?></td>
                            <td><?php echo ($v["goods_title"]); ?></td>
                            <td><?php echo order_amount($v['order_number'], $v['order_price']);?></td>
                            <td><?php echo (date('Y-m-d H:i:s', $v["order_time"])); ?></td>
                            <td><?php echo ($v["buyer_alipay"]); ?></td>
                            <td><?php echo (order_status($v["order_real_status"])); ?></td>
                            <td><a href="<?php echo U('Admin/Order/Modify', array('sn'=>$v['order_sn']));?>">订单操作</a></td>
                        </tr><?php endforeach; endif; else: echo "" ;endif; endif; ?>


            </table>
    </div>
    <div class="page">
        <?php echo ($page); ?>
    </div>

</div>

</body>
</html>